﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace DataAccessLayer
{
    [Serializable, XmlType("Aircraft")]
    [XmlInclude(typeof(Protagonist))]
    [XmlInclude(typeof(Enemy))]
    [XmlInclude(typeof(FighterPod))]
    public abstract class Aircraft : GameObject, IAlive, IMovable, IPowerful
    {
        [XmlElement("Hp")]
        public int Hp { get; set; }

        [XmlElement("Speed")]
        public int Speed { get; set; }

        [XmlElement("Power")]
        public int Power { get; set; }

        [XmlElement("WeaponSlots")]
        public int WeaponSlots { get; set; }
        
        [XmlArray("WeaponsIds"), XmlArrayItem("WeaponId")]
        public List<int> WeaponIds { get; set; }

        protected Aircraft()
        {
            Hp = 1;

            Speed = 1;

            Power = 1;
        }
    }
}